{extend name="public:layout" /}
{block name="content"}
<h4 class="text-center text-danger">编辑分类信息</h4>
<form class="form-horizontal" method="post">
    <div class="form-group">
        <label class="col-sm-2 control-label">名称:</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" name="name" value="{$cateInfo.name}">
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">排序:</label>
        <div class="col-sm-10">
            <input type="number" class="form-control" name="sort" value="{$cateInfo.sort}">
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">状态:</label>
        <div class="col-sm-10">
            <label class="radio-inline">
                <input type="radio" name="status"  value="1"
                       {//如果当前是显示则将它置为选中状态}
                {$cateInfo['status']?'checked="checked"':''}
                > 显示
            </label>
            <label class="radio-inline">
                <input type="radio" name="status"  value="0"
                       {//如果当前是隐藏则将它置为选中状态}
                {if isset($cateInfo['status']) && $cateInfo['status'] == 0}
                checked="checked"
                {/if}
                > 隐藏
            </label>
        </div>
    </div>


    <!-- 将当前栏目的id做为隐藏域上传 -->
    <input type="hidden" name="id" value="{$cateInfo.id}">

    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-info">保存</button>
        </div>
    </div>
</form>
{/block}